package com.gateway.hysyrix;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author HeWei hystrix服务
 */
@RestController
@RequestMapping("/gateway")
public class HystrixService {

    @RequestMapping("system/hystrix")
    public Map<String, Object> responseHystrix(){
        Map<String,Object> map = new HashMap<>(2);
        map.put("result",500);
        map.put("resultCode","system服务未响应");
        return map;
    }

    @RequestMapping("auth/hystrix")
    public Map<String, Object> authHystrix(){
        Map<String,Object> map = new HashMap<>(2);
        map.put("result",500);
        map.put("resultCode","认证服务未响应");
        return map;
    }
}
